package java8_26.oop.Test_2;

public class Pilot {
  private String name;

    public Pilot(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public void driver(BattlePlane battlePlane){
        System.out.println(name+"开着战斗机，战斗"+"战斗机重"+battlePlane.getWeight()+"飞了"+battlePlane.getHeight());
    }
    public void driver(Airliner airliner){
        System.out.println(name+"开着客机，载人+客机重"+airliner.getWeight()+"飞了"+airliner.getHeight());
    }
}
